package com.isoft.systemprovidor.controller.perinfor;

import com.isoft.systemprovidor.bean.ResponseData;
import com.isoft.systemprovidor.controller.BaseController;
import com.isoft.systemprovidor.entity.perinfor.Perinfor_Relative_Abroad;
import com.isoft.systemprovidor.entity.perinfor.Perinfor_Relative_Familynember;
import com.isoft.systemprovidor.service.perinfor.Perinfor_Relative_Abroad_Service;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@CrossOrigin
@RestController
@Slf4j
@RequestMapping("/systemprovidor/abroad")
public class Perinfor_Relative_Abroad_Controller extends BaseController {
    @Autowired
    Perinfor_Relative_Abroad_Service service;
    /*查看我的出国信息*/
    @GetMapping("/get")
    public ResponseData selectAbroad(String sysuserid){
        return service.selectAbroad(sysuserid);
    }

    /*修改我的出国信息*/
    @PutMapping("/update")
    public ResponseData<Boolean> changeAbroad( @RequestBody Perinfor_Relative_Abroad abroad){
        return returnBoolean(service.changeAbroad(abroad));
    }
    /*添加我的出国信息*/
    @PostMapping("/add")
    public ResponseData<Object> insertAbroad(Perinfor_Relative_Abroad abroad){
        return returnObject(service.insertAbroad(abroad));
    }
    /*删除我的出国信息(逻辑删除)*/
    @GetMapping("/islock")
    public ResponseData<Boolean> islockAbroad(Integer id ,String sysuserid){
        return returnBoolean(service.islockAbroad(id , sysuserid));
    }
}
